#ifndef _EMV_CONTECTLESS_H_
#define _EMV_CONTECTLESS_H_

#include <stdint.h>
#include "nfc_hal_config.h"

#define T_RESET	                        7

#define T_PAUSE		                      6 		/*T_PAUSE: 开始发送寻卡指令前，打开射频场的要求时间 */


#define T_RESETDELAY                    15//33		/*T_RESETDELAY: 从检测到冲突响应帧（start of EOF）开始，需要在此时间内回访到寻卡流程 */

#define T_RETRANSMISSION                7// TA001，TA002等, remove card WUPA retansmission < 136837.4/fc





typedef struct {
    uint8_t type_a:1;
    uint8_t type_b:1;
} picc_det_t;

typedef struct {
    uint8_t reset_test:1;
    uint8_t polling_test:1;
    uint8_t wupa_test:1;
    uint8_t wupb_test:1;
    uint8_t test_pause:1;

    // for EMV_30
    uint8_t poweroff_test:1;
    uint8_t wupa_rats_test:1;
    uint8_t wupb_attrib_test:1;

    uint8_t transac_a:1;
    uint8_t transac_b:1;

    uint32_t opt_count;
} emv_test_t;

//extern hal_nfc_regval_t EMV_typeA_configs[23];
//extern hal_nfc_regval_t EMV_typeB_configs[30];
extern uint8_t EMV_TEST;



void emv_cmd_process(void *pkt);
void emv_task(void);

#endif	//_EMV_CONTECTLESS_H_

